Local Variables

Local variables function as though they were temporary attributes defined in a specific logic section which disappear when the logic section is finished executing. Local variables are useful for test variables in loops and storing locally used, unique values for each entity at the current location.

Local variables are used within a block of logic (i.e., operation logic, subroutines) and are declared with an INT or REAL statement. Local variables are only available within the logic in which they are declared and are not defined in the Variables edit table. A new local variable is created for each entity to encounter an INT or REAL statement. See Int and Real for more information. A local variable is specific to each entity, in much the same way an attribute is specific to an entity, except that the local variable is only available while the entity processes the logic to declare the local variable. Local variables may be passed to subroutines as parameters. Local variables are available to macros.